<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%@page import="com.lmpop.trade.ti_trainsign.*" %>
<%@ page import="com.lmpop.trade.ts_category.Ts_categoryInfo" %>
<%@page import="java.util.*" %>
<html>
  <head>
    
    <title>培训报名管理</title>
	<link href="/program/admin/index/css/style.css" rel="stylesheet" type="text/css">
	<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/engine.js'></script>
	<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/util.js'></script>
	<script type='text/javascript' src='<%=request.getContextPath()%>/dwr/interface/Ts_categoryInfo.js'></script> 
	<script type="text/javascript" src="index.js"></script>
	<script language="javascript" type="text/javascript" src="/program/plugins/calendar/WdatePicker.js"></script>
</head>

<body>

  <% 
  	String trade_id="";
  	if(request.getParameter("trade_id")!=null) trade_id = request.getParameter("trade_id");
  	Ti_trainsignInfo ti_trainsignInfo = new Ti_trainsignInfo();
  	List list = ti_trainsignInfo.getListByPk(trade_id);
  	Hashtable map = new Hashtable();
  	if(list!=null && list.size()>0) map = (Hashtable)list.get(0);
  	
  	String cust_id="",class_attr="",name="",sex="",birth="",idnumber="",college="",workspace="",addr="",phone="",cellphone="",email="",qq="",msn="",selfdesc="",selfintro="",leaveword="",state="",user_id="",in_date="",fare="",fare_date="";
  	if(map.get("cust_id")!=null) cust_id = map.get("cust_id").toString();
  	if(map.get("class_attr")!=null) class_attr = map.get("class_attr").toString();
  	if(map.get("name")!=null) name = map.get("name").toString();
  	if(map.get("sex")!=null) sex = map.get("sex").toString();
  	if(map.get("birth")!=null) birth = map.get("birth").toString();
  	if(map.get("idnumber")!=null) idnumber = map.get("idnumber").toString();
  	if(map.get("college")!=null) college = map.get("college").toString();
  	if(map.get("workspace")!=null) workspace = map.get("workspace").toString();
  	if(map.get("addr")!=null) addr = map.get("addr").toString();
  	if(map.get("phone")!=null) phone = map.get("phone").toString();
  	if(map.get("cellphone")!=null) cellphone = map.get("cellphone").toString();
  	if(map.get("email")!=null) email = map.get("email").toString();
  	if(map.get("qq")!=null) qq = map.get("qq").toString();
  	if(map.get("msn")!=null) msn = map.get("msn").toString();
  	if(map.get("selfdesc")!=null) selfdesc = map.get("selfdesc").toString();
  	if(map.get("selfintro")!=null) selfintro = map.get("selfintro").toString();
  	if(map.get("leaveword")!=null) leaveword = map.get("leaveword").toString();
  	if(map.get("state")!=null) state = map.get("state").toString();
  	if(map.get("user_id")!=null) user_id = map.get("user_id").toString();
  	if(map.get("in_date")!=null) in_date = map.get("in_date").toString();
  	if(map.get("fare")!=null) fare = map.get("fare").toString();
	if(fare.equals("")) fare = "0";
  	if(map.get("fare_date")!=null) fare_date = map.get("fare_date").toString();
	if(fare_date.length() > 19) fare_date = fare_date.substring(0,19);


	Ts_categoryInfo  ts_categoryInfo  = new Ts_categoryInfo();

	Map catMap = ts_categoryInfo.getCatClassMap("10");

    String select = ts_categoryInfo.getSelCatByTLevel("10", "1");

	StringBuffer catAttr = new StringBuffer();
	if(!class_attr.equals("")){
	  String catIds[] =	class_attr.split("\\|");	
	  for(String catId:catIds){
		 if(catMap!=null){
			if(catMap.get(catId)!=null){
				catAttr.append(catMap.get(catId).toString() + " ");                
			}                  
		  }                 
	   }		    
	}

  %>
	
	<h1>修改培训报名</h1>
	
	<!--
	<table width="100%" align="center" cellpadding="0" cellspacing="0" class="dl_so">
        <tr>
          <td width="9%" align="center"><img src="/program/admin/index/images/ban_01.gif" /></td>
          <td width="91%" align="left">
		  <h4>-----------------</h4>
		  <span>1----------------。</span><br/>
		  <span>2----------------。</span>
		  </td>
        </tr>
      </table>
      <br/>
	  -->
	
	
	<form action="/doTradeReg.do" method="post" name="addForm">
	<table width="100%" cellpadding="0" cellspacing="1" border="0" class="listtab">
		
		
		<tr>
			<td align="right" width="10%">
				所报科目<font color="red">*</font>
			</td>
			<td>
				<div id="classId1" style="display:block;">
					<font color="#CECECE"><%=catAttr%></font>
					<input type="button" class="button_css"name="Submit3" value="重新选择类目" style="cursor:pointer;" onClick="ChangeClassStyle();"/>
				</div>
				<div id="classId2" style="display:none;">
					<select name="sort1" id="sort1" style="width:200px" onChange="setSecondClass(this.value);">
						<option value="">请选择</option>
						<%=select%>
					</select>
					<select name="sort2" id="sort2"  style="width:200px;display:none" onChange="setTherdClass(this.value);">
						<option value="">请选择</option>
					</select>
					<select name="sort3" id="sort3"  style="width:200px;display:none">
						<option value="">请选择</option>
					</select>
					<input type="hidden" name="class_attr" id="class_attr" value="<%=class_attr%>" />
				</div>
			</td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				姓名<font color="red">*</font>
			</td>
			<td><input name="name" id="name" size="20" maxlength="20" value="<%=name %>" type="text" /></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				性别:
			</td>
			<td>
				<input name="sex" type="radio" value="1" <%if(sex.equals("1"))out.println("checked");%>/>男&nbsp;
				<input name="sex" type="radio" value="2" <%if(sex.equals("2"))out.println("checked");%>/>女
			</td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				出生年月:
			</td>
			<td><input name="birth" id="birth" size="10" maxlength="10" value="<%=birth %>" type="text" class="Wdate" onfocus="WdatePicker({dateFmt:'yyyy年M月',minDate:'1900-1',maxDate:'2010-12'})"/></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				身份证号码:
			</td>
			<td><input name="idnumber" id="idnumber" size="20" maxlength="20" value="<%=idnumber %>" type="text" /></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				毕业学校:
			</td>
			<td><input name="college" id="college" size="50" maxlength="50" value="<%=college %>" type="text" /></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				现在学习或工作单位:
			</td>
			<td><input name="workspace" id="workspace" size="50" maxlength="100" value="<%=workspace %>" type="text" /></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				通讯地址:
			</td>
			<td><input name="addr" id="addr" size="50" maxlength="100" value="<%=addr %>" type="text" /></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				联系电话:
			</td>
			<td><input name="phone" id="phone" size="20" maxlength="20" value="<%=phone %>" type="text" /></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				手机<font color="red">*</font>
			</td>
			<td><input name="cellphone" id="cellphone" size="20" maxlength="20" value="<%=cellphone %>" type="text" /></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				E-mail:
			</td>
			<td><input name="email" id="email" size="50" maxlength="60" value="<%=email %>" type="text" /></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				QQ:
			</td>
			<td><input name="qq" id="qq" size="20" maxlength="20" value="<%=qq %>" type="text" /></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				MSN:
			</td>
			<td><input name="msn" id="msn" size="20" maxlength="20" value="<%=msn %>" type="text" /></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				个人工作简历:
			</td>
			<td><textarea name="selfdesc" id="selfdesc" rows="7" cols="60"><%=selfdesc %></textarea></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				个人荣誉:
			</td>
			<td><textarea name="selfintro" id="selfintro" rows="7" cols="60"><%=selfintro %></textarea></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				个人留言:
			</td>
			<td><textarea name="leaveword" id="leaveword" rows="7" cols="60"><%=leaveword %></textarea></td>
		</tr>
		
		<tr>
			<td align="right" width="10%">
				审核状态:
			</td>
			<td>
				<input name="state" type="radio" value="b" <%if(state.equals("b"))out.println("checked");%>/>不通过&nbsp;
				<input name="state" type="radio" value="c" <%if(state.equals("c"))out.println("checked");%>/>通过
			</td>
		</tr>

		<tr>
			<td align="right" width="10%">
				所缴费用:
			</td>
			<td><input name="fare" id="fare" size="20" maxlength="20" value="<%=fare %>" type="text" /></td>
		</tr>

		<tr>
			<td align="right" width="10%">
				缴费日期:
			</td>
			<td><input name="fare_date" id="fare_date" size="20" maxlength="20" value="<%=fare_date %>"  class="Wdate" onFocus="WdatePicker()" type="text" /></td>
		</tr>
		
	</table>
	
	<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td align="center">
				<input type="hidden" name="bpm_id" value="2631" />
	  			<input type="hidden" name="trade_id" value="<%=trade_id %>" />
				<input type="submit" class="buttoncss" name="tradeSub" value="提交" onclick="return checkSub();"/>&nbsp;&nbsp;
				<input type="button" class="buttoncss" name="tradeRut" value="返回" onclick="window.location.href='index.jsp';"/>
			</td>
		</tr>
	</table>
	</form>
</body>

</html>
